home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / v10n10.arc / EDLOOP.BAT < prev    next >
DOS Batch File  |  1991-04-29  |  734b  |  33 lines

  1.   @echo off
  2.  
  3. rem EDLOOP.BAT -- creates a batch file to repetitively execute a
  4. rem series of commands.  In this case ring the doorbell.
  5.  
  6.   if "%1"=="" goto NEEDNUMB
  7.  
  8. rem  Open the file ring.bat with the statements to be reiterated
  9.  
  10.    echo echo DING DONG > ring.bat
  11.  
  12. rem  Create input for the Edlin script
  13. rem  Use the count option & delete the first existence 
  14.  
  15.   echo 1,1,1,%1c > edlininp.dat
  16.   echo 1d >> edlininp.dat
  17.   echo e >>edlininp.dat
  18.   edlin ring.bat < edlininp.dat >nul
  19.  
  20. rem  Run the reiterative batch job & tidy up
  21.  
  22.   call ring.bat
  23.   erase edlininp.dat
  24.   erase ring.*
  25.   goto DONE
  26.  
  27. :NEEDNUMB
  28.  
  29.   ECHO The syntax should be
  30.   ECHO     EDLOOP n
  31.   ECHO where n is the number of iterations
  32.  
  33. :DONE